;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; general settings

(setenv "LANG" "en_US.UTF-8")
(setenv "LC_ALL" "en_US.UTF-8")

(setq make-backup-files nil)  ;; turn off auto backup
(auto-save-mode -1)  ;; turn off auto save

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; load configuration files

(defun fullpath-relative-to-current-file (file-relative-path)
  "Return the full path of FILE-RELATIVE-PATH, relative to file location where this function is called."

  ;; To know the current file's full path, emacs has 2 ways:
  ;; (1) 'load-file-name' and (2) 'buffer-file-name'
  ;; If the file is loaded by "load", then load-file-name works but buffer-file-name doesn't.
  ;; If the file is loaded by "eval-buffer", then load-file-name is nill
  (concat (file-name-directory (or load-file-name buffer-file-name)) file-relative-path))

;; add the dir of this file to load path
(add-to-list 'load-path (fullpath-relative-to-current-file ""))

(load (fullpath-relative-to-current-file "generic.el"))
(load (fullpath-relative-to-current-file "font.el"))

;; mode settings

(setq default-major-mode 'org-mode)   ;; use org-mode as default mode


;; for topcoder
(gnuserv-start)